package org.electrode.task;

import org.electrode.common.Variable;

public class VariableSetter extends PeriodicTask {
	final Variable variable;
	final double value;
	
	public VariableSetter(Variable variable, double value) {
		this.variable = variable;
		this.value = value;
		
	}
	
	public boolean doWork() {
		variable.set(value);
		return true;
	}

	public PeriodicTask copy() {
		return new VariableSetter(variable, value);
	}

}
